﻿using System;

namespace Common.Model
{
    public class Stock
    {
        public string StockCode { get; set; }
        public int Id { get; set; }
        public string TopicName { get; set; }
        public long InsertDate { get; set; }

        public override bool Equals(Object obj)
        {
            if (ReferenceEquals(this, obj)) return true;
            if (GetType() != obj.GetType()) return false;
            return string.Equals(StockCode, ((Stock)obj).StockCode);
        }

        public override int GetHashCode()
        {
            return null == StockCode ? base.GetHashCode() : StockCode.GetHashCode();
        }
    }
}